<!DOCTYPE html>

<html lang="en">
<head>
	<meta charset="utf-8">
	<title>HT for web Class: DataModel</title>

	<!--[if lt IE 9]>
	<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
	<![endif]-->
	<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">

	<link type="text/css" rel="stylesheet" href="styles/site.spacelab.css">

</head>

<body>
<div class="container-fluid">
	<div class="navbar navbar-fixed-top navbar-inverse">
		<div class="navbar-inner">
			<a class="brand" href="index.html">HT for web</a>
			<ul class="nav">
				
				<li class="dropdown">
					<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
						class="caret"></b></a>

					<ul class="dropdown-menu ">
						
						<li>
							<a href="ht.html">ht</a>
						</li>
						
						<li>
							<a href="ht.Default.html">ht.Default</a>
						</li>
						
						<li>
							<a href="ht.graph.html">ht.graph</a>
						</li>
						
						<li>
							<a href="ht.graph3d.html">ht.graph3d</a>
						</li>
						
						<li>
							<a href="ht.widget.html">ht.widget</a>
						</li>
						

					</ul>
				</li>
				
				<li class="dropdown">
					<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
						class="caret"></b></a>

					<ul class="dropdown-menu ">
						
						<li>
							<a href="ht.Column.html">ht.Column</a>
						</li>
						
						<li>
							<a href="ht.Data.html">ht.Data</a>
						</li>
						
						<li>
							<a href="ht.DataModel.html">ht.DataModel</a>
						</li>
						
						<li>
							<a href="ht.Edge.html">ht.Edge</a>
						</li>
						
						<li>
							<a href="ht.EdgeGroup.html">ht.EdgeGroup</a>
						</li>
						
						<li>
							<a href="ht.graph3d.Graph3dView.html">ht.graph3d.Graph3dView</a>
						</li>
						
						<li>
							<a href="ht.graph.DefaultInteractor.html">ht.graph.DefaultInteractor</a>
						</li>
						
						<li>
							<a href="ht.graph.EditInteractor.html">ht.graph.EditInteractor</a>
						</li>
						
						<li>
							<a href="ht.graph.GraphView.html">ht.graph.GraphView</a>
						</li>
						
						<li>
							<a href="ht.graph.Interactor.html">ht.graph.Interactor</a>
						</li>
						
						<li>
							<a href="ht.graph.MoveInteractor.html">ht.graph.MoveInteractor</a>
						</li>
						
						<li>
							<a href="ht.graph.SelectInteractor.html">ht.graph.SelectInteractor</a>
						</li>
						
						<li>
							<a href="ht.graph.TouchInteractor.html">ht.graph.TouchInteractor</a>
						</li>
						
						<li>
							<a href="ht.Grid.html">ht.Grid</a>
						</li>
						
						<li>
							<a href="ht.Group.html">ht.Group</a>
						</li>
						
						<li>
							<a href="ht.List.html">ht.List</a>
						</li>
						
						<li>
							<a href="ht.Node.html">ht.Node</a>
						</li>
						
						<li>
							<a href="ht.Notifier.html">ht.Notifier</a>
						</li>
						
						<li>
							<a href="ht.Property.html">ht.Property</a>
						</li>
						
						<li>
							<a href="ht.SelectionModel.html">ht.SelectionModel</a>
						</li>
						
						<li>
							<a href="ht.Shape.html">ht.Shape</a>
						</li>
						
						<li>
							<a href="ht.SubGraph.html">ht.SubGraph</a>
						</li>
						
						<li>
							<a href="ht.Tab.html">ht.Tab</a>
						</li>
						
						<li>
							<a href="ht.widget.AccordionView.html">ht.widget.AccordionView</a>
						</li>
						
						<li>
							<a href="ht.widget.BorderPane.html">ht.widget.BorderPane</a>
						</li>
						
						<li>
							<a href="ht.widget.ListView.html">ht.widget.ListView</a>
						</li>
						
						<li>
							<a href="ht.widget.Palette.html">ht.widget.Palette</a>
						</li>
						
						<li>
							<a href="ht.widget.PropertyView.html">ht.widget.PropertyView</a>
						</li>
						
						<li>
							<a href="ht.widget.SplitView.html">ht.widget.SplitView</a>
						</li>
						
						<li>
							<a href="ht.widget.TableHeader.html">ht.widget.TableHeader</a>
						</li>
						
						<li>
							<a href="ht.widget.TablePane.html">ht.widget.TablePane</a>
						</li>
						
						<li>
							<a href="ht.widget.TableView.html">ht.widget.TableView</a>
						</li>
						
						<li>
							<a href="ht.widget.TabView.html">ht.widget.TabView</a>
						</li>
						
						<li>
							<a href="ht.widget.Toolbar.html">ht.widget.Toolbar</a>
						</li>
						
						<li>
							<a href="ht.widget.TreeTablePane.html">ht.widget.TreeTablePane</a>
						</li>
						
						<li>
							<a href="ht.widget.TreeTableView.html">ht.widget.TreeTableView</a>
						</li>
						
						<li>
							<a href="ht.widget.TreeView.html">ht.widget.TreeView</a>
						</li>
						

					</ul>
				</li>
				
			</ul>
		</div>
	</div>

	<div class="row-fluid">

		
		<div class="span8">
			
				<div id="main">
					


	<h1 class="page-title">Class: DataModel</h1>
<section>

<header>
    <h2>
        <span class="ancestors"><a href="ht.html">ht</a>.</span>
    
    DataModel
    </h2>
    
</header>

<article>
    <div class="container-overview">
    

    
        
<dt>
    <h4 class="name" id="DataModel"><span class="type-signature"></span>new DataModel<span class="signature">()</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>数据容器ht.DataModel作为承载Data数据的模型，
管理着Data数据的增删以及变化事件派发， 
HT框架所有组件都是通过绑定DataModel，以不同的形式呈现到用户界面；
同时组件也会监听DataModel模型的变化事件， 实时同步更新界面数据信息，
掌握了DataModel的操作就掌握了所有组件的模型驱动方式。</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

    
    </div>

    

    

    

    

    

    

    
        <h3 class="subsection-title">Methods</h3>

        <dl>
            
<dt>
    <h4 class="name" id="a"><span class="type-signature"></span>a<span class="signature">(name, <span class="optional">value</span>)</span><span class="type-signature"> &rarr; {Object}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取或设置attr属性，仅有一个参数时相当于<a href="ht.DataModel.html#getAttr">getAttr</a>，有两个参数时相当于<a href="ht.DataModel.html#setAttr">setAttr</a></p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		
		<th>Argument</th>
		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>属性名</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>属性值</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type">Object</span>


	</dd>
</dl>


        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="add"><span class="type-signature"></span>add<span class="signature">(data, <span class="optional">index</span>)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>增加数据元素</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		
		<th>Argument</th>
		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="ht.Data.html">ht.Data</a></span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>数据元素</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>index</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>插入索引</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="addDataModelChangeListener"><span class="type-signature"></span>addDataModelChangeListener<span class="signature">(listener, <span class="optional">scope</span>, <span class="optional">ahead</span>)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>增加数据模型增删变化事件监听器</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		
		<th>Argument</th>
		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>listener</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>scope</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数域</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>ahead</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>是否将当前监听器插入到监听器列表开头</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	
	<dt class="tag-see">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="ht.DataModel.html#mm">mm</a></li>
			</ul>
	</dd>
	

	
</dl>

    
    

    

    
    
    
    
    
    
    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript"> dataModel.addDataModelChangeListener(function(event) {
     &#x2F;&#x2F;event格式：
     {
     	kind: &quot;add&quot;|&quot;remove&quot;|&quot;clear&quot;,&#x2F;&#x2F;事件类型
     	data: data&#x2F;&#x2F;事件相关data
     }
});</pre>


    
</dd>

        
            
<dt>
    <h4 class="name" id="addDataPropertyChangeListener"><span class="type-signature"></span>addDataPropertyChangeListener<span class="signature">(listener, <span class="optional">scope</span>, <span class="optional">ahead</span>)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>增加模型中Data元素属性变化事件监听器</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		
		<th>Argument</th>
		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>listener</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>scope</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数域</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>ahead</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>是否将当前监听器插入到监听器列表开头</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	
	<dt class="tag-see">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="ht.DataModel.html#md">md</a></li>
			</ul>
	</dd>
	

	
</dl>

    
    

    

    
    
    
    
    
    
    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript"> dataModel.addDataPropertyChangeListener(function(event) {
     &#x2F;&#x2F;event格式：
     {
     	property: &quot;name&quot;,&#x2F;&#x2F;发生变化的属性
     	data: data,&#x2F;&#x2F;属性发生变化的data
     	oldValue: 0,&#x2F;&#x2F;旧值
     	newValue: 1&#x2F;&#x2F;新值
     }
});</pre>


    
</dd>

        
            
<dt>
    <h4 class="name" id="addHierarchyChangeListener"><span class="type-signature"></span>addHierarchyChangeListener<span class="signature">(listener, <span class="optional">scope</span>, <span class="optional">ahead</span>)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>增加监听器，监听Data在DataModel中的层次(用于TreeView、TreeTableView等)变化事件</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		
		<th>Argument</th>
		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>listener</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>scope</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数域</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>ahead</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>是否将当前监听器插入到监听器列表开头</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	
	<dt class="tag-see">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="ht.DataModel.html#mh">mh</a></li>
			</ul>
	</dd>
	

	
</dl>

    
    

    

    
    
    
    
    
    
    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript"> dataModel.addHierarchyChangeListener(function(event) {
     &#x2F;&#x2F;event格式：
     {
     	data: data,&#x2F;&#x2F;事件相关Data
     	oldIndex: 0,&#x2F;&#x2F;旧层次
     	newIndex: 1&#x2F;&#x2F;新层次
     }
});</pre>


    
</dd>

        
            
<dt>
    <h4 class="name" id="addIndexChangeListener"><span class="type-signature"></span>addIndexChangeListener<span class="signature">(listener, <span class="optional">scope</span>, <span class="optional">ahead</span>)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>增加监听器，监听Data在DataModel中的索引(用于拓扑组件)变化事件</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		
		<th>Argument</th>
		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>listener</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>scope</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数域</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>ahead</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>是否将当前监听器插入到监听器列表开头</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript"> dataModel.addIndexChangeListener(function(event) {
     &#x2F;&#x2F;event格式：
     {
     	data: data,&#x2F;&#x2F;事件相关Data
     	oldIndex: 0,&#x2F;&#x2F;旧索引
     	newIndex: 1&#x2F;&#x2F;新索引
     }
});</pre>


    
</dd>

        
            
<dt>
    <h4 class="name" id="clear"><span class="type-signature"></span>clear<span class="signature">()</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>删除容器中所有Data对象，该操作一次性清空，没有逐个remove的过程，不会影响Data父子关系</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="contains"><span class="type-signature"></span>contains<span class="signature">(data)</span><span class="type-signature"> &rarr; {Boolean}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>判断容器是否包含该data对象</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="ht.Data.html">ht.Data</a></span>


            
            </td>

            

            

            <td class="description last"><p>要判断的数据元素</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>容器是否包含参数data</p>
</div>



<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type">Boolean</span>


	</dd>
</dl>


        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="deserialize"><span class="type-signature"></span>deserialize<span class="signature">(json, rootParent, setId)</span><span class="type-signature"> &rarr; {<a href="ht.List.html">ht.List</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>反序列化数据到数据容器</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>json</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"><p>要被反序列化的json字符串</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>rootParent</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="ht.Data.html">ht.Data</a></span>


            
            </td>

            

            

            <td class="description last"><p>指定反序列化的数据元素的父元素</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>setId</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            

            

            <td class="description last"><p>反序列化后的数据元素是否保留原id</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>被反序列化的数据元素集合</p>
</div>



<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="ht.List.html">ht.List</a></span>


	</dd>
</dl>


        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="each"><span class="type-signature"></span>each<span class="signature">(func, <span class="optional">scope</span>)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>提供一个回调函数遍历此容器</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		
		<th>Argument</th>
		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>func</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>遍历函数</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>scope</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>函数域</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript"> dataModel.each(function(data) {
  console.log(data);
});</pre>


    
</dd>

        
            
<dt>
    <h4 class="name" id="eachByBreadthFirst"><span class="type-signature"></span>eachByBreadthFirst<span class="signature">(func, <span class="optional">data</span>, <span class="optional">scope</span>)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>以data为起始广度优先遍历Data对象</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		
		<th>Argument</th>
		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>func</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>遍历函数</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="ht.Data.html">ht.Data</a></span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>遍历起点元素</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>scope</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>函数域</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="eachByDepthFirst"><span class="type-signature"></span>eachByDepthFirst<span class="signature">(func, <span class="optional">data</span>, <span class="optional">scope</span>)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>以data为起始深度优先遍历Data对象</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		
		<th>Argument</th>
		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>func</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>遍历函数</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="ht.Data.html">ht.Data</a></span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>遍历起点元素</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>scope</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>函数域</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="getAttr"><span class="type-signature"></span>getAttr<span class="signature">(name)</span><span class="type-signature"> &rarr; {Object}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取attr属性</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"><p>属性名</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type">Object</span>


	</dd>
</dl>


        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="getAttrObject"><span class="type-signature"></span>getAttrObject<span class="signature">()</span><span class="type-signature"> &rarr; {Object}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取attr属性对象，该属性默认为空，用于存储用户业务信息</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>attr属性对象</p>
</div>



<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type">Object</span>


	</dd>
</dl>


        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="getDataById"><span class="type-signature"></span>getDataById<span class="signature">(id)</span><span class="type-signature"> &rarr; {<a href="ht.Data.html">ht.Data</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>根据id快速查找Data对象，模型内部维护着一个id-&gt;data的映射表，因此查找速度比遍历方式快</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>id</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last"><p>要查找的id</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>查找到的Data</p>
</div>



<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="ht.Data.html">ht.Data</a></span>


	</dd>
</dl>


        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="getDataByTag"><span class="type-signature"></span>getDataByTag<span class="signature">(tag)</span><span class="type-signature"> &rarr; {<a href="ht.Data.html">ht.Data</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>根据tag快速查找，模型内部维护着一个tag-&gt;data的映射表，因此查找速度比遍历方式快</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>tag</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last"><p>要查找的tag</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>查找到的Data</p>
</div>



<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="ht.Data.html">ht.Data</a></span>


	</dd>
</dl>


        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="getDatas"><span class="type-signature"></span>getDatas<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="ht.List.html">ht.List</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取所有添加到容器的Data数据集合</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="ht.List.html">ht.List</a></span>


	</dd>
</dl>


        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="getHistoryManager"><span class="type-signature"></span>getHistoryManager<span class="signature">()</span><span class="type-signature"> &rarr; {ht.HistoryManager}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取历史管理器</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type">ht.HistoryManager</span>


	</dd>
</dl>


        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="getRoots"><span class="type-signature"></span>getRoots<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="ht.List.html">ht.List</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取所有parent为空的Data对象</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="ht.List.html">ht.List</a></span>


	</dd>
</dl>


        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="getSelectionModel"><span class="type-signature"></span>getSelectionModel<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="ht.SelectionModel.html">ht.SelectionModel</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取该容器的选择模型</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	
	<dt class="tag-see">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="ht.DataModel.html#sm">sm</a></li>
			</ul>
	</dd>
	

	
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="ht.SelectionModel.html">ht.SelectionModel</a></span>


	</dd>
</dl>


        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="getSerializableAttrs"><span class="type-signature"></span>getSerializableAttrs<span class="signature">()</span><span class="type-signature"> &rarr; {Object}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>此函数返回一个map，决定序列化时哪些attr属性可被序列化，默认所有attr对象里的属性都会被序列化</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>需要被序列化的attr属性map</p>
</div>



<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type">Object</span>


	</dd>
</dl>


        
    
    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript"> function(){
    var name, map = {};
    for (name in this._attrObject) {            
        map[name] = 1;
    }
    return map; 
}</pre>


    
</dd>

        
            
<dt>
    <h4 class="name" id="getSiblings"><span class="type-signature"></span>getSiblings<span class="signature">(data)</span><span class="type-signature"> &rarr; {<a href="ht.List.html">ht.List</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取和data同父子层次的兄弟数组，如果data父亲为空，则返回dataModel.getRoots()</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="ht.Data.html">ht.Data</a></span>


            
            </td>

            

            

            <td class="description last"><p>目标data</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="ht.List.html">ht.List</a></span>


	</dd>
</dl>


        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="isAutoAdjustIndex"><span class="type-signature"></span>isAutoAdjustIndex<span class="signature">()</span><span class="type-signature"> &rarr; {Boolean}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>是否自动调整data在容器中索引顺序</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type">Boolean</span>


	</dd>
</dl>


        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="isEmpty"><span class="type-signature"></span>isEmpty<span class="signature">()</span><span class="type-signature"> &rarr; {Boolean}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>判断容器是否为空</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type">Boolean</span>


	</dd>
</dl>


        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="md"><span class="type-signature"></span>md<span class="signature">(listener, <span class="optional">scope</span>, <span class="optional">ahead</span>)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>增加模型中Data元素属性变化事件监听器，<a href="ht.DataModel.html#addDataPropertyChangeListener">addDataPropertyChangeListener</a>的缩写</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		
		<th>Argument</th>
		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>listener</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>scope</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数域</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>ahead</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>是否将当前监听器插入到监听器列表开头</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	
	<dt class="tag-see">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="ht.DataModel.html#addDataPropertyChangeListener">addDataPropertyChangeListener</a></li>
			</ul>
	</dd>
	

	
</dl>

    
    

    

    
    
    
    
    
    
    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript"> dataModel.md(function(event) {
     &#x2F;&#x2F;event格式：
     {
     	property: &quot;name&quot;,&#x2F;&#x2F;发生变化的属性
     	data: data,&#x2F;&#x2F;属性发生变化的data
     	oldValue: 0,&#x2F;&#x2F;旧值
     	newValue: 1&#x2F;&#x2F;新值
     }
});</pre>


    
</dd>

        
            
<dt>
    <h4 class="name" id="mh"><span class="type-signature"></span>mh<span class="signature">(listener, <span class="optional">scope</span>, <span class="optional">ahead</span>)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>增加监听器，监听Data在DataModel中的层次(用于TreeView、TreeTableView等)变化事件，<a href="ht.DataModel.html#addHierarchyChangeListener">addHierarchyChangeListener</a>的缩写</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		
		<th>Argument</th>
		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>listener</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>scope</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数域</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>ahead</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>是否将当前监听器插入到监听器列表开头</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	
	<dt class="tag-see">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="ht.DataModel.html#addHierarchyChangeListener">addHierarchyChangeListener</a></li>
			</ul>
	</dd>
	

	
</dl>

    
    

    

    
    
    
    
    
    
    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript"> dataModel.mh(function(event) {
     &#x2F;&#x2F;event格式：
     {
     	data: data,&#x2F;&#x2F;事件相关Data
     	oldIndex: 0,&#x2F;&#x2F;旧层次
     	newIndex: 1&#x2F;&#x2F;新层次
     }
});</pre>


    
</dd>

        
            
<dt>
    <h4 class="name" id="mm"><span class="type-signature"></span>mm<span class="signature">(listener, <span class="optional">scope</span>, <span class="optional">ahead</span>)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>增加数据模型增删变化事件监听器，<a href="ht.DataModel.html#addDataModelChangeListener">addDataModelChangeListener</a>的缩写</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		
		<th>Argument</th>
		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>listener</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>scope</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数域</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>ahead</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>是否将当前监听器插入到监听器列表开头</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	
	<dt class="tag-see">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="ht.DataModel.html#addDataModelChangeListener">addDataModelChangeListener</a></li>
			</ul>
	</dd>
	

	
</dl>

    
    

    

    
    
    
    
    
    
    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript"> dataModel.mm(function(event) {
     &#x2F;&#x2F;event格式：
     {
     	kind: &quot;add&quot;|&quot;remove&quot;|&quot;clear&quot;,&#x2F;&#x2F;事件类型
     	data: data&#x2F;&#x2F;事件相关data
     }
});</pre>


    
</dd>

        
            
<dt>
    <h4 class="name" id="moveDown"><span class="type-signature"></span>moveDown<span class="signature">(data)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>移动data到同层兄弟数组中的下一个位置</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="ht.Data.html">ht.Data</a></span>


            
            </td>

            

            

            <td class="description last"><p>要移动的数据元素</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="moveSelectionDown"><span class="type-signature"></span>moveSelectionDown<span class="signature">(<span class="optional">sm</span>)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>移动当前选中的数据元素到同层兄弟数组中的下一个位置</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		
		<th>Argument</th>
		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>sm</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="ht.SelectionModel.html">ht.SelectionModel</a></span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>要操作的选中模型，如果为空，使用dataModel自身绑定的选中模型</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="moveSelectionToBottom"><span class="type-signature"></span>moveSelectionToBottom<span class="signature">(<span class="optional">sm</span>)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>移动当前选中的数据元素到同层兄弟数组的底部</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		
		<th>Argument</th>
		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>sm</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="ht.SelectionModel.html">ht.SelectionModel</a></span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>要操作的选中模型，如果为空，使用dataModel自身绑定的选中模型</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="moveSelectionToTop"><span class="type-signature"></span>moveSelectionToTop<span class="signature">(<span class="optional">sm</span>)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>移动当前选中的数据元素到同层兄弟数组的顶部</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		
		<th>Argument</th>
		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>sm</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="ht.SelectionModel.html">ht.SelectionModel</a></span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>要操作的选中模型，如果为空，使用dataModel自身绑定的选中模型</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="moveSelectionUp"><span class="type-signature"></span>moveSelectionUp<span class="signature">(<span class="optional">sm</span>)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>移动当前选中的数据元素到同层兄弟数组中的上一个位置</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		
		<th>Argument</th>
		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>sm</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="ht.SelectionModel.html">ht.SelectionModel</a></span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>要操作的选中模型，如果为空，使用dataModel自身绑定的选中模型</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="moveTo"><span class="type-signature"></span>moveTo<span class="signature">(data, newIndex)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>移动数据元素到同层兄弟数组中的指定索引</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="ht.Data.html">ht.Data</a></span>


            
            </td>

            

            

            <td class="description last"><p>要移动的数据元素</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>newIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last"><p>目标索引</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="moveToBottom"><span class="type-signature"></span>moveToBottom<span class="signature">(data)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>移动数据元素到同层兄弟数组的底部</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="ht.Data.html">ht.Data</a></span>


            
            </td>

            

            

            <td class="description last"><p>要移动的数据元素</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="moveToTop"><span class="type-signature"></span>moveToTop<span class="signature">(data)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>移动数据元素到同层兄弟数组的顶部</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="ht.Data.html">ht.Data</a></span>


            
            </td>

            

            

            <td class="description last"><p>要移动的数据元素</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="moveUp"><span class="type-signature"></span>moveUp<span class="signature">(data)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>移动数据元素到同层兄弟数组中的上一个位置</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="ht.Data.html">ht.Data</a></span>


            
            </td>

            

            

            <td class="description last"><p>要移动的数据元素</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onAdded"><span class="type-signature"></span>onAdded<span class="signature">(data)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>数据元素添加的回调函数，可重载做后续处理</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="ht.Data.html">ht.Data</a></span>


            
            </td>

            

            

            <td class="description last"><p>新添加的数据元素</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onDataPropertyChanged"><span class="type-signature"></span>onDataPropertyChanged<span class="signature">(data, e)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>数据元素属性变化回调函数，可重载做后续处理</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="ht.Data.html">ht.Data</a></span>


            
            </td>

            

            

            <td class="description last"><p>发生变化的数据元素</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>e</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last"><p>事件信息</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onRemoved"><span class="type-signature"></span>onRemoved<span class="signature">(data)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>数据元素删除时回调函数，可重载做后续处理</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="ht.Data.html">ht.Data</a></span>


            
            </td>

            

            

            <td class="description last"><p>被删除的数据元素</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="remove"><span class="type-signature"></span>remove<span class="signature">(data)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>删除数据元素，该操作有以下副作用：</p>
<ul>
<li>其子孙被递归从DataModel中删除</li>
<li>被断开父子关系data.setParent(null)</li>
<li>Edge类型通过edge.setSource(null)和data.setTarget(null)断开节点关系</li>
<li>Node类型会将其关联的连线从DataModel中删除</li>
<li>Node类型通过data.setHost(null)断开与宿主吸附节点关系</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="ht.Data.html">ht.Data</a></span>


            
            </td>

            

            

            <td class="description last"><p>要删除的数据元素</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="removeDataById"><span class="type-signature"></span>removeDataById<span class="signature">(id)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>通过id删除数据元素</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>id</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last"><p>要删除的数据元素id</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	
	<dt class="tag-see">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="ht.DataModel.html#remove">remove</a></li>
			</ul>
	</dd>
	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="removeDataByTag"><span class="type-signature"></span>removeDataByTag<span class="signature">(tag)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>通过tag删除数据元素</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>tag</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"><p>要删除的数据元素tag</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	
	<dt class="tag-see">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="ht.DataModel.html#remove">remove</a></li>
			</ul>
	</dd>
	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="removeDataModelChangeListener"><span class="type-signature"></span>removeDataModelChangeListener<span class="signature">(listener, <span class="optional">scope</span>)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>删除数据模型增删变化事件监听器</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		
		<th>Argument</th>
		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>listener</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>scope</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数域</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	
	<dt class="tag-see">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="ht.DataModel.html#umm">umm</a></li>
			</ul>
	</dd>
	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="removeDataPropertyChangeListener"><span class="type-signature"></span>removeDataPropertyChangeListener<span class="signature">(listener, <span class="optional">scope</span>)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>删除模型中Data元素属性变化事件监听器</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		
		<th>Argument</th>
		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>listener</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>scope</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数域</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	
	<dt class="tag-see">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="ht.DataModel.html#umd">umd</a></li>
			</ul>
	</dd>
	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="removeHierarchyChangeListener"><span class="type-signature"></span>removeHierarchyChangeListener<span class="signature">(listener, <span class="optional">scope</span>)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>删除监听Data在DataModel中的层次(用于TreeView、TreeTableView等)变化事件的监听器</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		
		<th>Argument</th>
		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>listener</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>scope</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数域</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	
	<dt class="tag-see">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="ht.DataModel.html#umh">umh</a></li>
			</ul>
	</dd>
	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="removeIndexChangeListener"><span class="type-signature"></span>removeIndexChangeListener<span class="signature">(listener, <span class="optional">scope</span>)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>删除监听Data在DataModel中的索引(用于拓扑组件)变化事件的监听器</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		
		<th>Argument</th>
		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>listener</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>scope</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数域</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="sendToBottom"><span class="type-signature"></span>sendToBottom<span class="signature">(data)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>将data在拓扑上置底</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="ht.Data.html">ht.Data</a></span>


            
            </td>

            

            

            <td class="description last"><p>要置底的数据元素</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="sendToTop"><span class="type-signature"></span>sendToTop<span class="signature">(data)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>将data在拓扑上置顶</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="ht.Data.html">ht.Data</a></span>


            
            </td>

            

            

            <td class="description last"><p>要置顶的数据元素</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="serialize"><span class="type-signature"></span>serialize<span class="signature">(space)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>将数据模型序列化成JSON格式字符串</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>space</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last"><p>缩进空格数</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="setAttr"><span class="type-signature"></span>setAttr<span class="signature">(name, value)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>设置attr属性</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"><p>属性名</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last"><p>属性值</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="setAttrObject"><span class="type-signature"></span>setAttrObject<span class="signature">(attrObject)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>设置attr属性对象，该属性默认为空，用于存储用户业务信息</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>attrObject</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last"><p>attr属性对象</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="setAutoAdjustIndex"><span class="type-signature"></span>setAutoAdjustIndex<span class="signature">(autoAdjustIndex)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>设置是否自动调整data在容器中索引顺序</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>autoAdjustIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            

            

            <td class="description last"><p>是否自动调整data在容器中索引顺序</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="size"><span class="type-signature"></span>size<span class="signature">()</span><span class="type-signature"> &rarr; {Number}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>返回当前容器中Data对象的总数</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type">Number</span>


	</dd>
</dl>


        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="sm"><span class="type-signature"></span>sm<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="ht.SelectionModel.html">ht.SelectionModel</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取该容器的选择模型</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	
	<dt class="tag-see">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="ht.DataModel.html#getSelectionModel">getSelectionModel</a></li>
			</ul>
	</dd>
	

	
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="ht.SelectionModel.html">ht.SelectionModel</a></span>


	</dd>
</dl>


        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="toDatas"><span class="type-signature"></span>toDatas<span class="signature">(<span class="optional">matchFunc</span>, <span class="optional">scope</span>)</span><span class="type-signature"> &rarr; {<a href="ht.List.html">ht.List</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>以matchFunc为过滤函数构建新的元素集合并返回</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		
		<th>Argument</th>
		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>matchFunc</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>过滤函数</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>scope</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>函数域</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>元素集合</p>
</div>



<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="ht.List.html">ht.List</a></span>


	</dd>
</dl>


        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="toJSON"><span class="type-signature"></span>toJSON<span class="signature">()</span><span class="type-signature"> &rarr; {Object}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>将数据模型序列化成JSON格式对象</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	

	
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>JSON对象</p>
</div>



<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type">Object</span>


	</dd>
</dl>


        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="umd"><span class="type-signature"></span>umd<span class="signature">(listener, <span class="optional">scope</span>)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>删除模型中Data元素属性变化事件监听器，<a href="ht.DataModel.html#removeDataPropertyChangeListener">removeDataPropertyChangeListener</a>的缩写</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		
		<th>Argument</th>
		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>listener</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>scope</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数域</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	
	<dt class="tag-see">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="ht.DataModel.html#removeDataPropertyChangeListener">removeDataPropertyChangeListener</a></li>
			</ul>
	</dd>
	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="umh"><span class="type-signature"></span>umh<span class="signature">(listener, <span class="optional">scope</span>)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>删除监听Data在DataModel中的层次(用于TreeView、TreeTableView等)变化事件的监听器，<a href="ht.DataModel.html#removeHierarchyChangeListener">removeHierarchyChangeListener</a>的缩写</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		
		<th>Argument</th>
		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>listener</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>scope</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数域</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	
	<dt class="tag-see">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="ht.DataModel.html#removeHierarchyChangeListener">removeHierarchyChangeListener</a></li>
			</ul>
	</dd>
	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="umm"><span class="type-signature"></span>umm<span class="signature">(listener, <span class="optional">scope</span>)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>删除数据模型增删变化事件监听器，<a href="ht.DataModel.html#removeDataModelChangeListener">removeDataModelChangeListener</a>的缩写</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
	<tr>
		
		<th>Name</th>
		

		<th>Type</th>

		
		<th>Argument</th>
		

		

		<th class="last">Description</th>
	</tr>
	</thead>

	<tbody>
	

        <tr>
            
                <td class="name"><code>listener</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数</p></td>
        </tr>

	

        <tr>
            
                <td class="name"><code>scope</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>监听器函数域</p></td>
        </tr>

	
	</tbody>
</table>

    
    
    
<dl class="details">
	

	

	

	

	

	

	

	

	



	

	

	
	<dt class="tag-see">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="ht.DataModel.html#removeDataModelChangeListener">removeDataModelChangeListener</a></li>
			</ul>
	</dd>
	

	
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        </dl>
    

    

    
</article>

</section>




				</div>

				<div class="clearfix"></div>
				<footer>
					
					
		<span class="copyright">
		© 2014 Hightopo Inc. All rights reserved. - Email: service@hightopo.com
		</span><br/>
					
						</footer>
			</div>

			
			<div class="span3">
				<div id="toc"></div>
			</div>
			
			<br clear="both">
		</div>

	</div>
	<!--<script src="scripts/sunlight.js"></script>-->
	<script src="scripts/docstrap.lib.js"></script>
	<script src="scripts/bootstrap-dropdown.js"></script>
	<script src="scripts/toc.js"></script>

	<script>
		$( function () {
			$( "[id*='$']" ).each( function () {
				var $this = $( this );

				$this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
			} );

			$( "#toc" ).toc( {
				anchorName  : function ( i, heading, prefix ) {
					return $( heading ).attr( "id" ) || ( prefix + i );
				},
				selectors   : "h1,h2,h3,h4",
				showAndHide : false,
				scrollTo    : "100px"
			} );

			$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
			$( "#main span[id^='toc']" ).addClass( "toc-shim" );
			$( '.dropdown-toggle' ).dropdown();
//			$( ".tutorial-section pre, .readme-section pre" ).addClass( "sunlight-highlight-javascript" ).addClass( "linenums" );

			$( ".tutorial-section pre, .readme-section pre" ).each( function () {
				var $this = $( this );

				var example = $this.find( "code" );
				exampleText = example.html();
				var lang = /{@lang (.*?)}/.exec( exampleText );
				if ( lang && lang[1] ) {
					exampleText = exampleText.replace( lang[0], "" );
					example.html( exampleText );
					lang = lang[1];
				} else {
					lang = "javascript";
				}

				if ( lang ) {

					$this
						.addClass( "sunlight-highlight-" + lang )
						.addClass( "linenums" )
						.html( example.html() );

				}
			} );

			Sunlight.highlightAll( {
				lineNumbers : true,
				showMenu : true,
				enableDoclinks : true
			} );
		} );
	 </script>



	<!--Navigation and Symbol Display-->
	
</body>
</html>